#ifndef _CONFIG_H__
#define _CONFIG_H__

#include <string>
#include <map>
using namespace std;

class Config;
class ConfigImport
{
public:
	ConfigImport(Config &config);
	int importConfig(const char *fileName);
		
private:
	int ConfigImport::processLineFormat (char* buffer, const string & section);

private:
	Config &config;	
};

class Config
{
friend class ConfigImport;
public:
	const map<string, string>& getMappingContent();
	const string &getSectionValue(const string &section, const string &name);
	
private:
	void setSectionValues(const string &section, const string &name, const string &value);

private:
	map< string, map<string, string> > config;
	map<string, string> nullMappingContent;
	string nullString;
};

#endif
